package leecode

func sockCollocation(sockets []int) (result []int) {
	hashMap := make(map[int]int)
	for _, socket := range sockets {
		hashMap[socket]++
	}
	for key, value := range hashMap {
		if value == 1 {
			result = append(result, key)
		}
		if len(result) == 2 {
			break
		}
	}
	return
}
